<?php
declare (strict_types = 1);

namespace app\adminapi\model\Admin;

use adminmatrix\admin\model\BaseModel;
use think\model\relation\HasMany;

/**
 * @mixin \think\Model
 */
class AdminRoles extends BaseModel
{
    //
    protected array $type = [
        "role_id"   =>  'int'
    ];


    #------------------------------------------------------------
    #
    #   关联模型
    #
    #------------------------------------------------------------

    # 角色关联权限
    public function permission():HasMany
    {
        return $this->hasMany(AdminRolePermission::class , 'role_id');
    }
}
